//
//  WeekCell.swift
//  koolcar
//
//  Created by xiantian on 2023/10/24.
//

import UIKit

class WeekCell: UICollectionViewCell {
    var titleLab: UILabel!
    var subTitleLab: UILabel!
    override init(frame: CGRect) {
        super.init(frame: frame)
        titleLab = UILabel()
        titleLab.textColor = UIColor.init(hex: 0x939AA8)
        titleLab.backgroundColor = UIColor.clear
        titleLab.font = UIFont.init(name: Theme.PingFangSCRegular, size: 12)
        titleLab.numberOfLines = 1
        titleLab.lineBreakMode = .byTruncatingTail
        titleLab.textAlignment = .center
        self.contentView.addSubview(titleLab)
        
        subTitleLab = UILabel()
        subTitleLab.textColor = Theme.titleLabColor
        subTitleLab.backgroundColor = UIColor.clear
        subTitleLab.font = UIFont.init(name: Theme.PingFangSCRegular, size: 14)
        subTitleLab.numberOfLines = 1
        subTitleLab.lineBreakMode = .byTruncatingTail
        subTitleLab.textAlignment = .center
        contentView.addSubview(subTitleLab)
        
        titleLab.snp.makeConstraints { make in
            make.left.right.equalTo(0)
            make.top.equalTo(6)
        }
        
        subTitleLab.snp.makeConstraints { make in
            make.left.right.equalTo(0)
            make.top.equalTo(titleLab.snp.bottom).offset(4)
            make.bottom.equalTo(-6)
        }
      
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
